﻿// //  ********************************************************************************
// //  Copyright (C) 2016 Sebastian Kenter. All rights reserved.
// // 
// //  Name    : MultiServerEngine | ServerFramework | ITelegramHandler.cs
// //  Created : 2016 - 02 - 16 20:53
// //  Modified: 2016 - 02 - 20 12:33
// //  ********************************************************************************

using ExitGames.Logging;
using ServerFramework.Interfaces.Telegram;
using TypeDefs;

namespace ServerFramework.Interfaces.Handler
{
    /// <summary>
    ///     Interface for a telegram handler
    /// </summary>
    /// <typeparam name="TPeer">The type of the peer to handle a telegram for</typeparam>
    public interface ITelegramHandler<in TPeer>
    {
        ILogger Logger { get; }
        TelegramHandlerTypes HandlerType { get; }
        byte Code { get; }
        int? SubCode { get; }

        bool HandleTelegram(ITelegram telegram, TPeer peer);
    }
}
